package com.gcxy.controller;


import com.gcxy.conf.result.R;
import com.gcxy.dto.RanchAddDTO;
import com.gcxy.dto.RanchPageDTO;
import com.gcxy.dto.RanchUpdateDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 牧场管理 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-25
 */
@RestController
@RequestMapping("/ranch")
@Api(value = "ranchController", tags = "牧场管理")
public class RanchController {
    @ApiOperation("新增牧场")
    @PostMapping("/addRanch")
    public R addRanch(@RequestBody RanchAddDTO ranchAddDTO) {
        return R.Success("新增牧场成功");
    }
    @ApiOperation("根据id停用启用")
    @PutMapping("/changeRanchStatus")
    public R changeRanchStatus(@RequestParam String id) {
        return R.Success("根据id停用启用成功");
    }
    @ApiOperation("根据牧场id获取牧场信息")
    @GetMapping("/getRanchById")
    public R getRanchById(@RequestParam String id) {
        return R.Success("根据牧场id获取牧场信息成功");
    }
    @ApiOperation("修改牧场")
    @PutMapping("/updateRanch")
    public R updateRanch(@RequestParam RanchUpdateDTO ranchUpdateDTO) {
        return R.Success("修改牧场成功");
    }
    @ApiOperation("删除牧场")
    @DeleteMapping("/deleteRanch")
    public R deleteRanch(@RequestParam String id) {
        return R.Success("删除牧场成功");
    }
    @ApiOperation("获取牧场列表")
    @GetMapping("/getRanchList")
    public R getRanchList(@RequestParam RanchPageDTO ranchPageDTO) {
        return R.Success("获取牧场列表成功");
    }
}
